package com.demo.jgit;

import java.io.File;
import java.io.IOException;

import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.lib.Repository;

public class JgitDemo {

	public static void main(String[] args) throws Exception {
		File gitpath=new File("I:\\gitWorkspace\\demo\\.git");
		Git git=Git.open(gitpath);
		Repository repo=git.getRepository();
		String branch=repo.getBranch();

	}

}
